-
Notifications
You must be signed in to change notification settings - Fork 30
feat: Add sedona-geo-traits-ext to sedona-db #194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add sedona-geo-traits-ext to sedona-db #194
Conversation
91b7012 to
7cbc5d7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds the sedona-geo-traits-ext crate to the sedona-db project as part of the forked dependency elimination plan. The crate provides extension traits for the geo-traits library, offering additional convenience methods and helpers that mirror the APIs of geo-types while working through trait objects.
Key changes include:
- Creation of a new standalone Rust crate with extension traits for geometric types
- Implementation of WKB (Well-Known Binary) support with optimized coordinate and line iterators
- Addition of type tagging system to work around Rust's orphan rule limitations
Reviewed Changes
Copilot reviewed 17 out of 18 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| rust/sedona-geo-traits-ext/Cargo.toml | Package configuration and dependencies |
| rust/sedona-geo-traits-ext/README.md | Documentation explaining the crate's purpose and design |
| rust/sedona-geo-traits-ext/src/lib.rs | Main library file with public exports |
| rust/sedona-geo-traits-ext/src/type_tag.rs | Type tagging system for trait dispatch |
| rust/sedona-geo-traits-ext/src/coord.rs | Coordinate extension traits |
| rust/sedona-geo-traits-ext/src/point.rs | Point geometry extension traits |
| rust/sedona-geo-traits-ext/src/line.rs | Line geometry extension traits |
| rust/sedona-geo-traits-ext/src/line_string.rs | LineString geometry extension traits |
| rust/sedona-geo-traits-ext/src/polygon.rs | Polygon geometry extension traits |
| rust/sedona-geo-traits-ext/src/multi_point.rs | MultiPoint geometry extension traits |
| rust/sedona-geo-traits-ext/src/multi_line_string.rs | MultiLineString geometry extension traits |
| rust/sedona-geo-traits-ext/src/multi_polygon.rs | MultiPolygon geometry extension traits |
| rust/sedona-geo-traits-ext/src/geometry_collection.rs | GeometryCollection extension traits |
| rust/sedona-geo-traits-ext/src/geometry.rs | Main geometry extension traits |
| rust/sedona-geo-traits-ext/src/rect.rs | Rectangle geometry extension traits |
| rust/sedona-geo-traits-ext/src/triangle.rs | Triangle geometry extension traits |
| rust/sedona-geo-traits-ext/src/wkb_ext.rs | WKB format support with optimized iterators |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
test(sedona-geo-traits-ext): add non-trivial LineString tests (rev_lines, is_closed); triangles left pending due to overflow panic fix(LineStringTraitExt::triangles): use saturating_sub for <3 coords and add comprehensive tests test(sedona-geo-traits-ext): split LineString combined test into rev_lines, triangles, and is_closed refactor(tests): switch to let-else pattern in WKB tests for flatter control flow test: expand LineString tests (empty, 2pt, 3pt, 4pt) for rev_lines/is_closed/triangles Fix
paleolimbot
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Co-authored-by: Dewey Dunnington <[email protected]>
This is part of the forked dependency elimination plan: #165. This PR depends on #194. This PR moves geo-generic-alg from wherobots/geo to sedona-db and renamed it to sedona-geo-generic-alg. Currently it is a standalone crate and can be compiled using `cd rust/sedona-geo-generic-alg && cargo build`. We'll update the Cargo.toml files in the final step to make it live. The code moved to sedona-db only contains the algorithms actually used by other parts of the project. There's a backup containing all ported algorithms here: https://github.com/Kontinuation/sedona-db/tree/full-migrate-generic-alg.
This is part of the forked dependency elimination plan: #165. This PR depends on #193.
This PR moves geo-traits-ext from wherobots/geo to sedona-db and renamed it to sedona-geo-traits-ext. Currently it is a standalone crate and can be compiled using
cd rust/sedona-geo-traits-ext && cargo build. We'll update the Cargo.toml files in the final step to make it live.